<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul,li{
            list-style: none;
        }
        div{
            background: #8b8b8b;
        }
        ul{
            padding: 10px;
            height: 30px;
            width: 700px;
        }
        li{
            float: left;
            margin: 0px 10px;
            /*鼠标悬浮形状*/
            cursor: pointer;
            padding: 3px 5px;
            width: 100px;
        }
        li:hover{
            background: #cdcdcd;
        }
        ul:after{
            content: "";
            display: block;
            clear: both;
        }
        span{
            display: none;
        }
        li:hover span{
            display: inline-block;
        }
    </style>
</head>
<body>
    <div>
        <ul>
            <li>导航栏
                <br><span>测试数据</span>
            </li>
            <li>导航栏<br><span>测试数据</span></li>
            <li>导航栏<br><span>测试数据</span></li>
            <li>导航栏<br><span>测试数据</span></li>
            <li>导航栏<br><span>测试数据</span></li>
        </ul>
    </div>
哈哈
</body>
</html>